use mysql::prelude::*;
use mysql::Pool;
pub fn test_db() {

    let pool = Pool::new("mysql://root:root@192.168.1.108:3306/cartonexchange").unwrap();
    let mut conn = pool.get_conn().unwrap();

    // 执行查询
    let query_result: Vec<(i32, String)> = conn.query_map("SELECT id, user_no FROM user_basic_information limit 10", |(id, user_no)| (id, user_no)).unwrap();

    // 输出结果
    for (id, user_no) in query_result {
        println!("ID: {}, Name: {}", id, user_no);
    }
}